﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace GioHangViet.Models
{
    [Table("ProductComments")]
    public class ProductComment
    {
        /// <summary>
        /// Get and Set Property Data of File column Id in Table ProductComments 
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayProductCommentId")]
        public int Id { get; set; }

        /// <summary>
        /// Get and Set Property Data of File column ProductId in Table ProductComments 
        /// </summary>
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayProductId")]
        [Required(ErrorMessageResourceName = "ErrorProductId", ErrorMessageResourceType = typeof(Resources.Error))]
        public int ProductId { get; set; }

        /// <summary>
        /// Get and Set Property Data of File column UserName in Table ProductComments 
        /// </summary>
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayUserUserName")]
        [Required(ErrorMessageResourceName = "ErrorUserUserName", ErrorMessageResourceType = typeof(Resources.Error))]
        public string UserName { get; set; }

        /// <summary>
        /// Get and Set Property Data of File column Verified in Table ProductComments 
        /// </summary>
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayProductCommentVerified")]
        [DefaultValue(false)]
        public bool Verified { get; set; }

        /// <summary>
        /// Get and Set Property Data of File column Title in Table ProductComments 
        /// </summary>
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayProductCommentTitle")]
        [Required(ErrorMessageResourceName = "ErrorProductCommentTitle", ErrorMessageResourceType = typeof(Resources.Error))]
        public string Title { get; set; }

        /// <summary>
        /// Get and Set Property Data of File column Description in Table ProductComments 
        /// </summary>
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayProductCommentDescription")]
        [Required(ErrorMessageResourceName = "ErrorProductCommentDescription", ErrorMessageResourceType = typeof(Resources.Error))]
        public string Description { get; set; }

        /// <summary>
        /// Get and Set Property Data of File column ParentId in Table ProductComments 
        /// </summary>
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayProductCommentParentId")]
        public int ParentId { get; set; }

        /// <summary>
        /// Get and Set Property Data of File column CreateDate in Table ProductComments 
        /// </summary>
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayProductCommentCreateDate")]
        [Required(ErrorMessageResourceName = "ErrorProductCreateDate", ErrorMessageResourceType = typeof(Resources.Error))]
        public DateTime CreateDate { get; set; }
    }
}